#ifndef TASKQUEUE_H
#define TASKQUEUE_H
#include "threadPool.h"

typedef struct Task_s {
        void*(*func)(void*, MYSQL*);
        void* arg;
} Task;

typedef struct node_s {
        Task           task;
        struct node_s* next;
} Node;

typedef struct TaskQueue_s {
        Node* front;
        Node* rear;
        int   size;
} taskQueue;

int queue_init(taskQueue* queue);
int enque(taskQueue* queue, Task t);
int deque(taskQueue* queue);

#endif